package com.czt.mail.controller;

import com.czt.mail.entity.UserDTO;
import com.czt.mail.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author czt
 * @version 1.0
 * {@desc}
 * @date 2024/8/23 13:51
 */
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private UserService userService;

    @PostMapping
    public String login(@RequestBody UserDTO userDTO) {
        return userService.login(userDTO);
    }
}
